library ItemGrenade initializer init requires LegacySystem


	private function DetonateConditions takes nothing returns boolean
		return GetSpellAbilityId()=='A026' or GetSpellAbilityId()=='A00U' 
	endfunction

	private function Detonate takes nothing returns nothing
		call GernadeStunAOE(GetSpellTargetX(),GetSpellTargetY())
	endfunction

	private function init takes nothing returns nothing
		local trigger t
		set t = CreateTrigger()
		call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
		call TriggerAddCondition( t, Condition( function DetonateConditions ) )
		call TriggerAddAction(t,function Detonate)
	endfunction



endlibrary